package cn.wetcland.urban.admin.service.impl;

import cn.wetcland.urban.admin.mapper.UtDistrictMapper;
import cn.wetcland.urban.admin.service.UtDistrictService;
import cn.wetcland.urban.generator.domain.UtDistrict;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
* @author Wetcland
* @description 针对表【ut_district】的数据库操作Service实现
* @createDate 2024-01-21 09:51:59
*/
@Service
public class UtDistrictServiceImpl extends ServiceImpl<UtDistrictMapper, UtDistrict> implements UtDistrictService {

    @Resource
    public UtDistrictMapper districtMapper;

    @Override
    public List<UtDistrict> searchCity(String cityName) {
        return districtMapper.selectList(new QueryWrapper<UtDistrict>()
                .eq("level", "city")
                .like("name", cityName)
        );
    }
}




